<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <title><spring:message code="message.jieSuan.jiaoKuanDan"/><spring:message code="message.jqGrid.cz.audit"/></title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="${ctx}/lib/js/html5shiv.min.js"></script>
        <script src="${ctx}/lib/js/respond.min.js"></script>
    <![endif]-->
        <style type="text/css">
        .text-left{
        color:#949494;
        }
    </style>
</head>
<body class="skin-blue sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1><spring:message code="message.jieSuan.jiaoKuanDan"/><spring:message code="message.jqGrid.cz.audit"/><spring:message code="message.jqGrid.cz.xiangQing"/></h1>
        <ol class="breadcrumb">
            <li><a href="${ctx }/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
           <li class="active"><spring:message code="message.jieSuan.jiaoKuanDanGuanLi"/></li>
        <li class="active"><a href="#"><spring:message code="message.jieSuan.jiaoKuanDan"/></a></li>
        <li class="active"><a href="#"><spring:message code="message.jieSuan.jiaoKuanDan"/><spring:message code="message.jqGrid.cz.audit"/></a></li>
        </ol>
    </section>
    <section class="content">
        <div class=" box box-success ">
            <form  class="form-horizontal" id="form" action="auditAndSaveSetPostOrderBySetCenter.html" method="post" >
            	<div class="box-body">
                    <div class="form-group form-group-xs">
                        <label for="techPos" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanDanMingCheng"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
                            ${setPostOrder.postOrderName}
                        </div>
                        <label for="techPosCertNo" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanTime"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
			              	  ${setPostOrder.postDatetimeStr} 
                        </div>
                    </div> 
                    <div class="line"></div>
                    <div class="form-group form-group-xs">
                    	<label for="position" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanYinHang"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
	                 		   ${setPostOrder.postBankName} 
                        </div>
                        <label for="industry" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanJinE"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
                             ${postAmount} 
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group form-group-xs">
                        <label for="expertCode" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanZhangHu"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
                             ${setPostOrder.postBankAcct} 
                        </div>
                        <label for="name" class="col-sm-2 text-right"><spring:message code="message.jieSuan.jiaoKuanZhangHuMing"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-4 text-left">
                         ${setPostOrder.postBankAcctHolder} 
                        </div>
                    </div>
                    <div class="line"></div>
                    <div class="form-group form-group-xs">
                        <label for="remark" class="col-sm-2 control-label"><spring:message code="message.jieSuan.jiaoKuanBeiZhu"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-9">
                           ${setPostOrder.postRemark}
                        </div>
                    </div>
                    <div class="line"></div>
                   <div class="form-group form-group-xs">
                        <label for="name" class="col-sm-2 text-right"><spring:message code="message.listForm.shenHeBeiZhu"/><spring:message code="message.yanZheng.maoHao"/></label>
                        <div class="col-sm-9">
                           <textarea class="form-control" rows="3" id="auditRemark"  name="auditRemark" placeholder="<spring:message code="message.listForm.shenHeBeiZhu"/>" ></textarea>
                        </div>
                   </div>
                    
                    
                    
                </div>
                <div class="box-footer text-center">
                    <button type="button" class="btn btn-success btn-sm pass" ><spring:message code="message.listForm.tongGuoSpacing"/></button>
                    <button type="button" class="btn btn-success btn-sm unpass" ><spring:message code="message.listForm.buTongGuo"/></button>
                    <a href="javascript:history.go(-1);" class="btn btn-danger btn-sm"><spring:message code="message.button.getBackSpacing"/></a>
                </div> 
            </form>
        </div>
    </section>
	<%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
	   $("#postOrderName").focus();//加载页面光标在第一个查询框内
    
    
    function validate() {
   		var auditRemark = $.trim($("#auditRemark").val());
		if(auditRemark.length>512){
			$.HN.message.alert("<spring:message code="message.listForm.shenHeBeiZhu"/><spring:message code="message.info.zuiDaChangDu"/>512<spring:message code="message.info.geZiFu"/>！", "<spring:message code="message.HN.alert.type"/>", "warn");
			return false;
		}
		return true;
	}
    $(function(){
    	$('.pass').click(function(){
    		if (!validate()) {return;} 
			 $.HN.message.confirm('<spring:message code="message.jieSuan.queDingTongGuoAudit"/>', '', '').on(function (e) {
                 if (e) {
                	  $.post('auditAndSaveSetPostOrderByCenter.html', {postOrderId: "${setPostOrder.postOrderId}",status:"1",auditRemark:$('#auditRemark').val()},
                		function (success) {
	               			if (success) {
	           					$.HN.message.alert("<spring:message code="message.HN.alert.success"/>", "<spring:message code="message.HN.alert.type"/>", "success", function() {
	           						document.location = "javascript:history.go(-1)";
	           					});
	           				} else {
	           					$.HN.message.alert(msg || "<spring:message code="message.HN.alert.fail"/>", "<spring:message code="message.HN.alert.type"/>", "error");
	           				}
                	    })
                 }
    	     });
        });
    	$('.unpass').click(function(){
    		if (!validate()) {return;} 
			 $.HN.message.confirm('<spring:message code="message.jieSuan.queDingBuTongGuoAudit"/>', '', '').on(function (e) {
                if (e) {
                 $.post('auditAndSaveSetPostOrderByCenter.html', {postOrderId: "${setPostOrder.postOrderId}",status:"2"}, 
                		 function (success) {
		         			if (success) {
		    					$.HN.message.alert("<spring:message code="message.HN.alert.success"/>", "<spring:message code="message.HN.alert.type"/>", "success", function() {
		    						document.location = "javascript:history.go(-1)";
		    					});
		    				} else {
		    					$.HN.message.alert(msg || "<spring:message code="message.HN.alert.fail"/>", "<spring:message code="message.HN.alert.type"/>", "error");
		    				}
        		});
                 
                }
   	     });
       });
    	
    
    })
 </script>
</body>
</html>